package javase.day05;

import java.util.Arrays;

public class Demo6 {
	public static void main(String[] args) {
		String[] ary = {"a","b"};
		String[] ary1=Arrays.copyOf(ary, 2);
		String[] ary2 = (String[])IOUtils.deepCopy(ary);
		System.out.println(ary==ary1);  //false
		System.out.println(ary[0]==ary1[0]);  //true
		System.out.println(ary==ary2);  //false
		System.out.println(ary[0]==ary2[0]); //false
		System.out.println(Arrays.equals(ary, ary1)); //true
		System.out.println(Arrays.equals(ary, ary2)); //true
	}
}
